package com.ysd.qxgl.service;

import java.util.List;

import javax.annotation.Resource;

import com.ysd.qxgl.dao.IRoleModulesDao;
import com.ysd.qxgl.model.Modules;

import org.springframework.stereotype.Service;

@Service
public class RoleModuleServiceImpl implements IRoleModuleService {

    @Resource
    private IRoleModulesDao roleModuleDao;

    @Override
    public void setRoleModules(String roleId, List<String> moduleIdList) {
        for (String moduleId : moduleIdList) {
            roleModuleDao.addRoleModules(roleId, moduleId);
        }

    }

    @Override
    public List<Modules> findRoleModulesById(String role_id) {
        return roleModuleDao.findRoleModulesById(role_id);
    }

}